﻿function Save_ERDDiagram(executionObj) {
    silverLightControl = document.getElementById("WebResource_ERDDiagram");
    slapp = silverLightControl.contentWindow.document.getElementById("ERDDiagram").content.mySLapp;
    if (slapp.IsDirty()) {
        if (executionObj.getEventArgs().getSaveMode() == 2) {

            executionObj.getEventArgs().preventDefault();
            slapp.SaveDiagram(true);
        }
        else {

            slapp.SaveDiagram(false);
        }
    }
}
